home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume11 / reve / patch4c < prev    next >
Encoding:
Text File  |  1991-01-03  |  39.2 KB  |  1,070 lines

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v12i012:  reve - an othello game, Patch4c
  5. Message-ID: <6770@tekred.CNA.TEK.COM>
  6. Date: 21 Dec 90 20:56:20 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1059
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Rich Burridge <rburridge@sun.COM>
  12. Posting-number: Volume 12, Issue 12
  13. Archive-name: reve/Patch4c
  14. Patch-To: reve: Volume 11, Issue 52-58
  15. Environment: SunView, XView, X11R4, termcap
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 3 (of 4)."
  26. # Contents:  patches04c
  27. # Wrapped by billr@saab on Fri Dec 21 11:35:54 1990
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'patches04c' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'patches04c'\"
  31. else
  32. echo shar: Extracting \"'patches04c'\" \(37317 characters\)
  33. sed "s/^X//" >'patches04c' <<'END_OF_FILE'
  34. X
  35. X------- color.h -------
  36. X*** /tmp/da06825    Tue Dec 18 10:08:17 1990
  37. X--- color.h    Tue Dec 11 18:19:51 1990
  38. X***************
  39. X*** 22,45 ****
  40. X   *  (see README file), then an attempt will be made to fix them.
  41. X   */
  42. X  
  43. X! #define  OTH_COLOR      "othcolor"
  44. X! #define  OTH_COLORSIZE  8
  45. X  
  46. X  #define  C_WHITE    0
  47. X! #define  C_LGREY    1
  48. X! #define  C_LBROWN   2
  49. X! #define  C_BEIGE    3
  50. X! #define  C_DBROWN   4
  51. X! #define  C_BLACK    5
  52. X! #define  C_SPARE6   6
  53. X! #define  C_SPARE7   7
  54. X! 
  55. X! #define oth_colorsetup(r, g, b) \
  56. X!         (r)[C_WHITE] = 255 ;  (g)[C_WHITE] = 255 ;  (b)[C_WHITE] = 255 ; \
  57. X!         (r)[C_LGREY] = 200 ;  (g)[C_LGREY] = 200 ;  (b)[C_LGREY] = 200 ; \
  58. X!         (r)[C_LBROWN] = 200 ; (g)[C_LBROWN] = 150 ; (b)[C_LBROWN] = 100 ; \
  59. X!         (r)[C_BEIGE] = 255 ;  (g)[C_BEIGE] = 240 ;  (b)[C_BEIGE] = 220 ; \
  60. X!         (r)[C_DBROWN] = 185 ; (g)[C_DBROWN] = 145 ; (b)[C_DBROWN] = 100 ; \
  61. X!         (r)[C_BLACK] = 0 ;    (g)[C_BLACK] = 0 ;    (b)[C_BLACK] = 0 ; \
  62. X!         (r)[C_SPARE6] = 0 ;   (g)[C_SPARE6] = 0 ;   (b)[C_SPARE6] = 0 ; \
  63. X!         (r)[C_SPARE7] = 0 ;   (g)[C_SPARE7] = 0 ;   (b)[C_SPARE7] = 0 ;
  64. X--- 22,45 ----
  65. X   *  (see README file), then an attempt will be made to fix them.
  66. X   */
  67. X  
  68. X! #define  REVE_COLOR      "revecolor"
  69. X! #define  REVE_COLORSIZE  8
  70. X  
  71. X  #define  C_WHITE    0
  72. X! #define  C_BLACK    1
  73. X! #define  C_PANEL    2
  74. X! #define  C_SQUARE   3
  75. X! #define  C_BORDER   4
  76. X! #define  C_GRID     5
  77. X! #define  C_TEXT     6
  78. X! #define  C_ITEMS    7
  79. X!  
  80. X! #define reve_colorsetup(r, g, b) \
  81. X!         (r)[C_WHITE]  = 255 ;  (g)[C_WHITE]  = 255 ;  (b)[C_WHITE]  = 255 ; \
  82. X!         (r)[C_BLACK]  = 0   ;  (g)[C_BLACK]  = 0   ;  (b)[C_BLACK]  = 0   ; \
  83. X!         (r)[C_PANEL]  = 255 ;  (g)[C_PANEL]  = 240 ;  (b)[C_PANEL]  = 220 ; \
  84. X!         (r)[C_SQUARE] = 200 ;  (g)[C_SQUARE] = 150 ;  (b)[C_SQUARE] = 100 ; \
  85. X!         (r)[C_BORDER] = 185 ;  (g)[C_BORDER] = 145 ;  (b)[C_BORDER] = 100 ; \
  86. X!         (r)[C_GRID]   = 200 ;  (g)[C_GRID]   = 200 ;  (b)[C_GRID]   = 200 ; \
  87. X!         (r)[C_TEXT]   = 0 ;    (g)[C_TEXT]   = 0 ;    (b)[C_TEXT]   = 0 ;   \
  88. X!         (r)[C_ITEMS]  = 200 ;  (g)[C_ITEMS]  = 200 ;  (b)[C_ITEMS]  = 200 ;
  89. X
  90. X------- extern.h -------
  91. X*** /tmp/da06828    Tue Dec 18 10:08:18 1990
  92. X--- extern.h    Sun Dec 16 10:53:55 1990
  93. X***************
  94. X*** 32,37 ****
  95. X--- 32,41 ----
  96. X  extern int cury ;          /* Current mouse Y position. */
  97. X  extern int down ;          /* Indicates is a mouse button is down. */
  98. X  extern int first_move ;    /* Set if computer plays first move. */
  99. X+ extern int help_height ;   /* Height of the help window. */
  100. X+ extern int help_showing ;  /* If set, the help window is visible. */
  101. X+ extern int help_width ;    /* Width of the help window. */
  102. X+ extern int hfont_height ;  /* Height in pixels for help font. */
  103. X  extern int iconic ;        /* Start as an icon if set. */
  104. X  extern int inv_video ;     /* Set if displaying in inverse video. */
  105. X  extern int iscolor[] ;     /* Set if this is a color screen. */
  106. X***************
  107. X*** 51,56 ****
  108. X--- 55,61 ----
  109. X  extern int nextc ;         /* Current event identifier. */
  110. X  extern int next_player ;   /* Next player (BLACK or WHITE) to move. */
  111. X  extern int nfont_height ;  /* Height in pixels for normal font. */
  112. X+ extern int old_diffval ;   /* Old difficulty value (possibly restored). */
  113. X  extern int piece_x ;       /* Current X position of moving piece. */
  114. X  extern int piece_y ;       /* Current Y position of moving piece */
  115. X  extern int play_computer ; /* Set if playing against the computer. */
  116. X***************
  117. X*** 75,80 ****
  118. X--- 80,94 ----
  119. X  extern int wx ;            /* Initial X position of the window. */
  120. X  extern int wy ;            /* Initial Y position of the window. */ 
  121. X  
  122. X+ extern FILE *hfp ;              /* File descriptor for online help file. */
  123. X+ 
  124. X+ extern long help_offsets[] ;    /* Offsets into the reve help file. */
  125. X+ 
  126. X+ extern char *colstr[] ;    /* X resource color values. */
  127. X+ extern int rcols[] ;       /* Red colormap values. */
  128. X+ extern int gcols[] ;       /* Green colormap values. */
  129. X+ extern int bcols[] ;       /* Blue colormap values. */
  130. X+ 
  131. X  extern time_t timeleft ;   /* Amount of time left for computer moves. */
  132. X  extern long edges[] ;      /* Edges Stability Table */
  133. X  extern long note ;         /* Note value for current computer move. */
  134. X***************
  135. X*** 84,89 ****
  136. X--- 98,104 ----
  137. X  extern char edgefile[] ;         /* Location of the reve edge table file. */
  138. X  extern char gamefile[] ;         /* Name of file for load/save. */
  139. X  extern char geometry[MAXDPY][MAXLINE] ;   /* X11 geometry information. */
  140. X+ extern char helpfile[] ;         /* Location of the reve online help file. */
  141. X  extern char line[] ;
  142. X  extern char *notes_values[] ;    /* Values for cyclic notes button. */
  143. X  extern char *player_values[] ;   /* Values for cyclic black/white item. */
  144. X
  145. X------- reve.h -------
  146. X*** /tmp/da06831    Tue Dec 18 10:08:19 1990
  147. X--- reve.h    Sun Dec 16 02:37:24 1990
  148. X***************
  149. X*** 63,68 ****
  150. X--- 63,69 ----
  151. X  #define  BGAP          10       /* Width of the gap between buttons. */
  152. X  #define  BHEIGHT       32       /* Height of a reve button item. */
  153. X  #define  BWIDTH        64       /* Width of a reve button item. */
  154. X+ #define  CGAP          4        /* Size of the gap for a cycle item. */
  155. X  #define  CHEIGHT       20       /* Height of a reve cycle item. */
  156. X  #define  CHOICEGAP     5        /* Gap between choices in a choice item. */
  157. X  #define  CWIDTH        32       /* Width of a reve cycle item. */
  158. X***************
  159. X*** 103,111 ****
  160. X--- 104,115 ----
  161. X  #define  LINEFEED       13
  162. X  #define  RETURN         10
  163. X  
  164. X+ #define  CTL(n)        n - 96  /* Control characters. */
  165. X  #define  ESCAPE        27      /* ASCII escape character. */
  166. X  #define  EQUAL(a, b)   !strncmp(a, b, strlen(b))
  167. X  #define  FOR_BOARD(i)  for (i = 0; i < 64; i++)
  168. X+ #define  HELP_COLS     80      /* Number of columns in help window. */
  169. X+ #define  HELP_ROWS     60      /* Number of rows in help window. */
  170. X  #define  ICONHEIGHT    64      /* Height in pixels for reve icon. */
  171. X  #define  ICONWIDTH     64      /* Width in pixels of reve icon. */
  172. X  #define  INC           argc-- ; argv++ ;
  173. X***************
  174. X*** 117,130 ****
  175. X  #define  MAXCURSORS    3       /* Maximum number of cursor types. */
  176. X  #define  MAXDIFF       9       /* Number of levels of difficulty. */
  177. X  #define  MAXDPY        2       /* Maximum possible number of displays. */
  178. X! #define  MAXFONTS      2       /* Maximum number of font types. */
  179. X  #define  MAXIMAGES     11      /* Maximum number of image types. */
  180. X! #define  MAXITEMS      24      /* Number of different panel items. */
  181. X  
  182. X  #ifndef  MAXLINE
  183. X! #define  MAXLINE       80      /* Length of character strings. */
  184. X  #endif /*!MAXLINE*/
  185. X  
  186. X  #define  MAX_PROFMAX   60      /* Maximum search depth. */
  187. X  #define  NIVEAUMAX     25      /* Maximum possible depth. */
  188. X  
  189. X--- 121,135 ----
  190. X  #define  MAXCURSORS    3       /* Maximum number of cursor types. */
  191. X  #define  MAXDIFF       9       /* Number of levels of difficulty. */
  192. X  #define  MAXDPY        2       /* Maximum possible number of displays. */
  193. X! #define  MAXFONTS      3       /* Maximum number of font types. */
  194. X  #define  MAXIMAGES     11      /* Maximum number of image types. */
  195. X! #define  MAXITEMS      29      /* Number of different panel items. */
  196. X  
  197. X  #ifndef  MAXLINE
  198. X! #define  MAXLINE       120     /* Length of character strings. */
  199. X  #endif /*!MAXLINE*/
  200. X  
  201. X+ #define  MAXPAGES      10      /* Maximum number of pages in reve help file. */
  202. X  #define  MAX_PROFMAX   60      /* Maximum search depth. */
  203. X  #define  NIVEAUMAX     25      /* Maximum possible depth. */
  204. X  
  205. X***************
  206. X*** 150,155 ****
  207. X--- 155,163 ----
  208. X  #define  PROPS_WIDTH   ((NOBUTS*BWIDTH)   + ((NOBUTS-1)*BGAP)  + (2*BBORDER))
  209. X  #define  PSIZE         40      /* Diameter of playing piece. */
  210. X  
  211. X+ #define  B_COLOR(c)   (iscolor[(int) cur_dpyno] ? c : C_BLACK)
  212. X+ #define  W_COLOR(c)   (iscolor[(int) cur_dpyno] ? c : C_WHITE)
  213. X+ 
  214. X  #define  TICKHEIGHT    16      /* Height of the tick toggle box. */
  215. X  #define  TICKWIDTH     16      /* Width of the tick toggle box. */
  216. X  
  217. X***************
  218. X*** 157,162 ****
  219. X--- 165,174 ----
  220. X  #define  EDGENAME      "reve.edgetable"
  221. X  #endif /*!EDGENAME*/
  222. X  
  223. X+ #ifndef  HELPNAME
  224. X+ #define  HELPNAME      "reve.help"
  225. X+ #endif /*!HELPNAME*/
  226. X+ 
  227. X  #ifndef  INT_SIGNAL
  228. X  #define  SIGRET        void
  229. X  #else
  230. X***************
  231. X*** 191,197 ****
  232. X  #define  KEYBOARD         109    /* Keyboard character has been pressed. */
  233. X  #define  MOUSE_MOVING     110    /* Mouse is moving. */
  234. X  #define  PROPS_REPAINT    111    /* Property window needs repainting. */
  235. X! #define  IGNORE_EVENT     112    /* No interest in this event. */
  236. X  
  237. X  /* Batch, last move, locking or show all direction (ON or OFF). */
  238. X  enum bltype   { IS_OFF, IS_ON } ;
  239. X--- 203,210 ----
  240. X  #define  KEYBOARD         109    /* Keyboard character has been pressed. */
  241. X  #define  MOUSE_MOVING     110    /* Mouse is moving. */
  242. X  #define  PROPS_REPAINT    111    /* Property window needs repainting. */
  243. X! #define  HELP_REPAINT     112    /* Help window needs repainting. */
  244. X! #define  IGNORE_EVENT     113    /* No interest in this event. */
  245. X  
  246. X  /* Batch, last move, locking or show all direction (ON or OFF). */
  247. X  enum bltype   { IS_OFF, IS_ON } ;
  248. X***************
  249. X*** 207,213 ****
  250. X  
  251. X  enum dpy_type { DPY1, DPY2 } ;                    /* Possible dpy types. */
  252. X  
  253. X! enum font_type { NFONT, BFONT } ;                 /* Text font definitions. */
  254. X  
  255. X  enum gr_type { GSUNVIEW, GTTY, GX11, GXVIEW } ;   /* Graphical systems. */
  256. X  
  257. X--- 220,226 ----
  258. X  
  259. X  enum dpy_type { DPY1, DPY2 } ;                    /* Possible dpy types. */
  260. X  
  261. X! enum font_type { BFONT, HFONT, NFONT} ;           /* Text font definitions. */
  262. X  
  263. X  enum gr_type { GSUNVIEW, GTTY, GX11, GXVIEW } ;   /* Graphical systems. */
  264. X  
  265. X***************
  266. X*** 223,237 ****
  267. X  enum move_type { M_BEST, M_MOVE, M_PROFMAX, M_SUGGESTION, M_TIME } ;
  268. X  
  269. X  /* Different panel items. */
  270. X! enum panel_type { LOAD_BUT,    MOVES_BUT,    NEW_GAME_BUT, SAVE_BUT,
  271. X!                   SUGGEST_BUT, UNDO_BUT,     PROPS_BUT,    CANCEL_BUT,
  272. X                    QUIT_BUT,    BLACK_PLAYS,  WHITE_PLAYS,  PANEL_MES,
  273. X                    EVAL_MES,    SCORE_MES,    TURN_MES,     COMP_CHOICE,
  274. X                    DIFF_CHOICE, MAX_DEPTH,    OPT_ANIM,     OPT_BEST,
  275. X!                   OPT_LAST,    OPT_EVAL,     OPT_NUM,      OPT_FLIP } ;
  276. X  
  277. X  enum res_type { R_ANIMATE, R_BESTMOVE, R_DIFFICULTY, R_LAST,  /* Resources. */
  278. X!                 R_LOG,     R_NOTES,    R_NUMBER,     R_QUICK } ;
  279. X  
  280. X  enum set_type { INCREMENT, DECREMENT, NONE } ;   /* Cycle directions. */
  281. X  
  282. X--- 236,254 ----
  283. X  enum move_type { M_BEST, M_MOVE, M_PROFMAX, M_SUGGESTION, M_TIME } ;
  284. X  
  285. X  /* Different panel items. */
  286. X! enum panel_type { LOAD_BUT,    MOVES_BUT,    NEW_GAME_BUT, HELP_BUT,
  287. X!                   REDO_BUT,    PROPS_BUT,    SAVE_BUT,     SUGGEST_BUT,
  288. X!                   EDIT_BUT,    STOP_BUT,     UNDO_BUT,     CANCEL_BUT,
  289. X                    QUIT_BUT,    BLACK_PLAYS,  WHITE_PLAYS,  PANEL_MES,
  290. X                    EVAL_MES,    SCORE_MES,    TURN_MES,     COMP_CHOICE,
  291. X                    DIFF_CHOICE, MAX_DEPTH,    OPT_ANIM,     OPT_BEST,
  292. X!                   OPT_LAST,    OPT_EVAL,     OPT_NUM,      OPT_FLIP,
  293. X!                   HELP_PAGE } ;
  294. X  
  295. X  enum res_type { R_ANIMATE, R_BESTMOVE, R_DIFFICULTY, R_LAST,  /* Resources. */
  296. X!                 R_LOG,     R_NOTES,    R_NUMBER,     R_QUICK,
  297. X!                 R_PANELC,  R_BOARDC,   R_BOARDBC,    R_GRIDC,
  298. X!                 R_TEXTC,   R_ITEMC,    R_PROPS,      R_HELP } ;
  299. X  
  300. X  enum set_type { INCREMENT, DECREMENT, NONE } ;   /* Cycle directions. */
  301. X  
  302. X***************
  303. X*** 239,247 ****
  304. X  
  305. X  enum playtype { PLAY_BLACK, PLAY_WHITE } ; /* What the computer is playing. */
  306. X  
  307. X! enum win_type { W_MAIN, W_PROPS } ;        /* Window types. */
  308. X  
  309. X! extern char *getenv() ;
  310. X  extern void exit() ;
  311. X  
  312. X  typedef struct {
  313. X--- 256,264 ----
  314. X  
  315. X  enum playtype { PLAY_BLACK, PLAY_WHITE } ; /* What the computer is playing. */
  316. X  
  317. X! enum win_type { W_MAIN, W_HELP, W_PROPS } ;      /* Window types. */
  318. X  
  319. X! extern char *getenv(), *malloc() ;
  320. X  extern void exit() ;
  321. X  
  322. X  typedef struct {
  323. X***************
  324. X*** 288,305 ****
  325. X      int depth ;
  326. X    } ;
  327. X  
  328. X  char *getenv(), *index() ;
  329. X  char *get_resource() ;
  330. X  
  331. X  void animate_move(),       batch(),              check_button_down() ;
  332. X  void check_choice_down(),  check_cycle_down(),   check_item_down() ;
  333. X! void check_item_up(),      check_toggle_down(),  close_frame() ;
  334. X! void color_area() ;
  335. X  void computer_move(),      computer_plays(),     connect_to_reve() ;
  336. X! void create_menu(),        destroy_frame() ;
  337. X! void do_action(),          do_computer_move(),   do_cycle_key() ;
  338. X! void do_key_move(),        do_move(),            do_props() ;
  339. X! void do_selection(),       do_suggest(),         domove() ;
  340. X  void done(),               draw_button(),        draw_choice() ;
  341. X  void draw_cycle(),         draw_cycle_item(),    draw_image() ;
  342. X  void draw_line(),          draw_outline(),       draw_piece() ;
  343. X--- 305,325 ----
  344. X      int depth ;
  345. X    } ;
  346. X  
  347. X+ FILE *find_file() ;
  348. X+ 
  349. X  char *getenv(), *index() ;
  350. X  char *get_resource() ;
  351. X  
  352. X  void animate_move(),       batch(),              check_button_down() ;
  353. X  void check_choice_down(),  check_cycle_down(),   check_item_down() ;
  354. X! void check_item_up(),      check_toggle_down(),  color_area() ;
  355. X  void computer_move(),      computer_plays(),     connect_to_reve() ;
  356. X! void create_menu(),        destroy_frame(),      display_help() ;
  357. X! void do_action() ;
  358. X! void do_computer_move(),   do_edit(),            do_help() ;
  359. X! void do_key(),             do_key_move(),        do_move() ;
  360. X! void do_props(),           do_selection() ;
  361. X! void do_stop(),            do_suggest(),         domove() ;
  362. X  void done(),               draw_button(),        draw_choice() ;
  363. X  void draw_cycle(),         draw_cycle_item(),    draw_image() ;
  364. X  void draw_line(),          draw_outline(),       draw_piece() ;
  365. X***************
  366. X*** 309,329 ****
  367. X  void get_options(),        get_xy(),             getparam() ;
  368. X  void handle_board_event(), handle_event(),       handle_item() ;
  369. X  void handle_key(),         init_canvas(),        init_edge_table() ;
  370. X! void init_fonts(),         initboard(),          initialise() ;
  371. X! void load_colors(),        load_game() ;
  372. X! void load_resources(),     lock_screen() ;
  373. X! void make_canvas(),        make_frame(),         make_icon() ;
  374. X  void make_message(),       make_move(),          make_panel() ;
  375. X  void message(),            nap_upto(),           new_game() ;
  376. X! void open_frame(),         paint_prop_sheet(),   position_popup() ;
  377. X! void process_event(),      quit() ;
  378. X! void read_resources(),     remove_textfield(),   reset_time() ;
  379. X  void save_game(),          set_computer(),       set_cursor() ;
  380. X  void set_cycle(),          set_display_types(),  set_eval() ;
  381. X! void set_option(),         set_score(),          set_timer() ;
  382. X  void set_turn(),           show_all(),           show_all_moves() ;
  383. X  void show_best(),          show_last(),          show_number() ;
  384. X! void show_suggestion(),    start_tool() ;
  385. X! void suggest(),            think(),              undo() ;
  386. X  void update_board_image(), usage(),              who_wins() ;
  387. X  void write_to_reve() ;
  388. X--- 329,352 ----
  389. X  void get_options(),        get_xy(),             getparam() ;
  390. X  void handle_board_event(), handle_event(),       handle_item() ;
  391. X  void handle_key(),         init_canvas(),        init_edge_table() ;
  392. X! void init_help_file(),     init_fonts(),         initboard() ;
  393. X! void initialise(),         load_colors(),        load_game() ;
  394. X! void load_resources(),     lock_screen(),        make_canvas() ;
  395. X! void make_frame(),         make_help_window(),   make_icon() ;
  396. X  void make_message(),       make_move(),          make_panel() ;
  397. X  void message(),            nap_upto(),           new_game() ;
  398. X! void paint_help(),         paint_help_text(),    paint_prop_sheet() ;
  399. X! void position_popup() ;
  400. X! void process_event(),      quit(),               read_resources() ;
  401. X! void read_str(),           redo(),               redo_move() ;
  402. X! void remove_textfield(),   reset_time() ;
  403. X  void save_game(),          set_computer(),       set_cursor() ;
  404. X  void set_cycle(),          set_display_types(),  set_eval() ;
  405. X! void set_frame(),          set_option() ;
  406. X! void set_score(),          set_timer() ;
  407. X  void set_turn(),           show_all(),           show_all_moves() ;
  408. X  void show_best(),          show_last(),          show_number() ;
  409. X! void show_suggestion(),    start_tool(),         suggest() ;
  410. X! void think(),              undo(),               undo_move() ;
  411. X  void update_board_image(), usage(),              who_wins() ;
  412. X  void write_to_reve() ;
  413. X
  414. X------- Imakefile -------
  415. X*** /tmp/da06834    Tue Dec 18 10:08:19 1990
  416. X--- Imakefile    Wed Dec 12 16:22:49 1990
  417. X***************
  418. X*** 58,64 ****
  419. X       
  420. X  /*  Compilation flags and standard macro definitions.  */
  421. X  
  422. X! SYS_LIBRARIES    = $(XLIB)     
  423. X  CDEFS        = $(NOSELECT) $(NO_USLEEP) $(EDGENAME) $(SELTYPE) \
  424. X            $(SIGRET)
  425. X  DEFINES         = $(CDEFS) -DX11
  426. X--- 58,65 ----
  427. X       
  428. X  /*  Compilation flags and standard macro definitions.  */
  429. X  
  430. X! X11LIBS        = $(XLIB)     
  431. X! TTYLIBS        = -ltermcap
  432. X  CDEFS        = $(NOSELECT) $(NO_USLEEP) $(EDGENAME) $(SELTYPE) \
  433. X            $(SIGRET)
  434. X  DEFINES         = $(CDEFS) -DX11
  435. X***************
  436. X*** 72,85 ****
  437. X  EDGENAME        = -DEDGENAME=\"$(EDGENAMEFILE)\"
  438. X  
  439. X       
  440. X! SRCS        = boardstuff.c events.c items.c makemove.c main.c \
  441. X!           procs.c rev_eval.c rev_ip.c rev_iycp.c x11.c
  442. X! OBJS        = boardstuff.o events.o items.o makemove.o main.o \
  443. X!           procs.o rev_eval.o rev_ip.o rev_iycp.o x11.o
  444. X  
  445. X! ComplexProgramTarget(reve)
  446. X  MakeDirectories(install,$(USRLIBDIR)$(PATHSEP)reve)
  447. X  InstallNonExec($(ETABLE),$(USRLIBDIR)$(PATHSEP)reve)
  448. X  
  449. X  install:: install.man
  450. X  
  451. X--- 73,99 ----
  452. X  EDGENAME        = -DEDGENAME=\"$(EDGENAMEFILE)\"
  453. X  
  454. X       
  455. X! REVESRCS        = rev_eval.c rev_ip.c rev_iycp.c
  456. X! STDSRCS         = boardstuff.c events.c makemove.c main.c procs.c
  457. X! REVEOBJS        = rev_eval.o rev_ip.o rev_iycp.o
  458. X! STDOBJS         = boardstuff.o events.o makemove.o main.o procs.o
  459. X  
  460. X! SRCS1        = $(STDSRCS) $(REVESRCS) common.c items.c x11.c
  461. X! OBJS1        = $(STDOBJS) $(REVEOBJS) common.o items.o x11.o
  462. X! SRCS2        = $(STDSRCS) $(REVESRCS) common.c items.c tty.c
  463. X! OBJS2        = $(STDOBJS) $(REVEOBJS) common.o items.o tty.o
  464. X! 
  465. X! 
  466. X! PROGRAMS    = reve
  467. X! 
  468. X! ComplexProgramTarget_1(reve, $(X11LIBS), /**/)
  469. X  MakeDirectories(install,$(USRLIBDIR)$(PATHSEP)reve)
  470. X  InstallNonExec($(ETABLE),$(USRLIBDIR)$(PATHSEP)reve)
  471. X+ 
  472. X+ tty: tty_reve
  473. X+     -cp tty_reve reve
  474. X+ 
  475. X+ NormalProgramTarget(tty_reve, $(OBJS2), /**/, /**/, $(TTYLIBS))
  476. X  
  477. X  install:: install.man
  478. X  
  479. X
  480. X------- reve_proc.c -------
  481. X*** /tmp/da06837    Tue Dec 18 10:08:20 1990
  482. X--- reve_proc.c    Sun Dec 16 11:09:45 1990
  483. X***************
  484. X*** 31,36 ****
  485. X--- 31,38 ----
  486. X  
  487. X  int saveres = 0 ;            /* If set, save computer results to log file. */
  488. X  
  489. X+ char edgefile[MAXLINE] ;     /* Location of the reve edge table file. */
  490. X+ 
  491. X  /* REVE global variables */
  492. X  
  493. X  int damier[NIVEAUMAX][64] ;  /* Boards at different depth level */
  494. X
  495. X------- common.c -------
  496. X*** /tmp/da06840    Tue Dec 18 10:08:21 1990
  497. X--- common.c    Sun Dec 16 11:01:07 1990
  498. X***************
  499. X*** 25,43 ****
  500. X  #include "reve.h"
  501. X  #include "extern.h"
  502. X  
  503. X! void
  504. X! init_edge_table(edgefile)     /* Load reve edge table values. */
  505. X! char *edgefile ;
  506. X  {
  507. X!   char buf[MAXLINE], *getenv(), name[MAXLINE], *paths, *ptr ;
  508. X!   int i, line ;
  509. X    FILE *fp = NULL ;
  510. X  
  511. X!   i = 0 ;
  512. X!   if ((fp = fopen(edgefile, "r")) == NULL)
  513. X      {
  514. X        paths = getenv("PATH") ;
  515. X!       if ((ptr = paths) && edgefile[0] != '/')
  516. X          for (;;)
  517. X            if (*ptr == ':' || *ptr == 0)
  518. X              {
  519. X--- 25,42 ----
  520. X  #include "reve.h"
  521. X  #include "extern.h"
  522. X  
  523. X! FILE *
  524. X! find_file(filename)
  525. X! char *filename ;
  526. X  {
  527. X!   char name[MAXLINE], *paths, *ptr ;
  528. X!   int i = 0 ;
  529. X    FILE *fp = NULL ;
  530. X  
  531. X!   if ((fp = fopen(filename, "r")) == NULL)
  532. X      {
  533. X        paths = getenv("PATH") ;
  534. X!       if ((ptr = paths) && filename[0] != '/')
  535. X          for (;;)
  536. X            if (*ptr == ':' || *ptr == 0)
  537. X              {
  538. X***************
  539. X*** 52,59 ****
  540. X              }
  541. X            else name[i++] = *ptr++ ;
  542. X      }
  543. X   
  544. X!   if (fp == NULL)
  545. X      {
  546. X        FPRINTF(stderr, "Cannot open Edge Stability Table file\n") ;
  547. X        exit(1) ;
  548. X--- 51,69 ----
  549. X              }
  550. X            else name[i++] = *ptr++ ;
  551. X      }
  552. X+   return(fp) ;
  553. X+ }
  554. X+ 
  555. X+ 
  556. X+ void
  557. X+ init_edge_table(edgefile)     /* Load reve edge table values. */
  558. X+ char *edgefile ;
  559. X+ {
  560. X+   char buf[MAXLINE], *ptr ;
  561. X+   int i, line ;
  562. X+   FILE *fp = NULL ;
  563. X   
  564. X!   if ((fp = find_file(edgefile)) == NULL)
  565. X      {
  566. X        FPRINTF(stderr, "Cannot open Edge Stability Table file\n") ;
  567. X        exit(1) ;
  568. X
  569. X------- boardstuff.c -------
  570. X*** /tmp/da06843    Tue Dec 18 10:08:21 1990
  571. X--- boardstuff.c    Tue Dec 11 19:53:46 1990
  572. X***************
  573. X*** 235,242 ****
  574. X  {
  575. X    int color, x, y ;
  576. X  
  577. X!   if (iscolor[(int) cur_dpyno]) color = (state == IS_ON) ? C_BLACK : C_LBROWN ;
  578. X!   else                          color = (state == IS_ON) ? C_BLACK : C_WHITE ;
  579. X  
  580. X    x = (move & 7)  * CELL_SIZE + BBORDER ;
  581. X    y = (move >> 3) * CELL_SIZE + BBORDER ;
  582. X--- 235,242 ----
  583. X  {
  584. X    int color, x, y ;
  585. X  
  586. X!   if (state == IS_ON) color = C_BLACK ;
  587. X!   else                color = W_COLOR(C_SQUARE) ;
  588. X  
  589. X    x = (move & 7)  * CELL_SIZE + BBORDER ;
  590. X    y = (move >> 3) * CELL_SIZE + BBORDER ;
  591. X***************
  592. X*** 513,519 ****
  593. X  show_all(state)
  594. X  enum bltype state ;
  595. X  {
  596. X!   int color, d, i, x, y ;
  597. X  
  598. X    d = (int) cur_dpyno ;
  599. X    batch(IS_ON) ;
  600. X--- 513,519 ----
  601. X  show_all(state)
  602. X  enum bltype state ;
  603. X  {
  604. X!   int d, i, x, y ;
  605. X  
  606. X    d = (int) cur_dpyno ;
  607. X    batch(IS_ON) ;
  608. X***************
  609. X*** 547,554 ****
  610. X              s_all.square[i] = FREE ;
  611. X              x = (i & 7)  * CELL_SIZE + BBORDER + 1 ;
  612. X              y = (i >> 3) * CELL_SIZE + BBORDER + 1 ;  
  613. X!             color = (iscolor[d]) ? C_LBROWN : C_WHITE ;
  614. X!             color_area(W_MAIN, x, CY + y, CELL_SIZE - 2, CELL_SIZE - 2, color) ;
  615. X            }
  616. X      }    
  617. X    batch(IS_OFF) ;
  618. X--- 547,554 ----
  619. X              s_all.square[i] = FREE ;
  620. X              x = (i & 7)  * CELL_SIZE + BBORDER + 1 ;
  621. X              y = (i >> 3) * CELL_SIZE + BBORDER + 1 ;  
  622. X!             color_area(W_MAIN, x, CY + y,
  623. X!                        CELL_SIZE - 2, CELL_SIZE - 2, W_COLOR(C_SQUARE)) ;
  624. X            }
  625. X      }    
  626. X    batch(IS_OFF) ;
  627. X***************
  628. X*** 602,608 ****
  629. X    else if (board.square[move] == WHITE)
  630. X      color = (state == IS_ON) ? C_BLACK : C_WHITE ;
  631. X    else if (iscolor[(int) cur_dpyno])
  632. X!     color = (state == IS_ON) ? C_BLACK : C_LBROWN ;
  633. X    else
  634. X      color = (state == IS_ON) ? C_BLACK : C_WHITE ;
  635. X  
  636. X--- 602,608 ----
  637. X    else if (board.square[move] == WHITE)
  638. X      color = (state == IS_ON) ? C_BLACK : C_WHITE ;
  639. X    else if (iscolor[(int) cur_dpyno])
  640. X!     color = (state == IS_ON) ? C_BLACK : C_SQUARE ;
  641. X    else
  642. X      color = (state == IS_ON) ? C_BLACK : C_WHITE ;
  643. X  
  644. X***************
  645. X*** 627,638 ****
  646. X    if (suggestion != -1)
  647. X      {
  648. X        rop = RCLR ;
  649. X-       color = (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE ;
  650. X        if (iscolor[(int) cur_dpyno]) rop = RSRC ;
  651. X        draw_line(W_MAIN, suggest_x-5, CY+suggest_y-5,
  652. X!                         suggest_x+5, CY+suggest_y+5, rop, color) ;
  653. X        draw_line(W_MAIN, suggest_x-5, CY+suggest_y+5,
  654. X!                         suggest_x+5, CY+suggest_y-5, rop, color) ;
  655. X        suggestion = -1 ;
  656. X      }
  657. X  }
  658. X--- 627,637 ----
  659. X    if (suggestion != -1)
  660. X      {
  661. X        rop = RCLR ;
  662. X        if (iscolor[(int) cur_dpyno]) rop = RSRC ;
  663. X        draw_line(W_MAIN, suggest_x-5, CY+suggest_y-5,
  664. X!                         suggest_x+5, CY+suggest_y+5, rop, W_COLOR(C_SQUARE)) ;
  665. X        draw_line(W_MAIN, suggest_x-5, CY+suggest_y+5,
  666. X!                         suggest_x+5, CY+suggest_y-5, rop, W_COLOR(C_SQUARE)) ;
  667. X        suggestion = -1 ;
  668. X      }
  669. X  }
  670. X
  671. X------- events.c -------
  672. X*** /tmp/da06846    Tue Dec 18 10:08:22 1990
  673. X--- events.c    Sun Dec 16 02:47:52 1990
  674. X***************
  675. X*** 37,42 ****
  676. X--- 37,45 ----
  677. X    n = (int) item ;
  678. X    if (items[n].x == -1) return ;
  679. X    if (items[n].wtype != curwin) return ;
  680. X+   if (tinput && (n == (int) SUGGEST_BUT || n == (int) EDIT_BUT ||
  681. X+                  n == (int) STOP_BUT    || n == (int) UNDO_BUT))
  682. X+     return ;
  683. X    if ((curx >  items[n].x) && (curx < (items[n].x + items[n].width)) &&
  684. X        (cury >  items[n].y) && (cury < (items[n].y + items[n].height)))
  685. X      {
  686. X***************
  687. X*** 43,49 ****
  688. X        down = nextc ;
  689. X        itemno = n ;
  690. X        but_inverted = itemno ;
  691. X!       draw_button(W_MAIN, (enum panel_type) itemno, C_LGREY, BUT_INVERT) ;
  692. X      }
  693. X  }
  694. X  
  695. X--- 46,52 ----
  696. X        down = nextc ;
  697. X        itemno = n ;
  698. X        but_inverted = itemno ;
  699. X!       draw_button(W_MAIN, (enum panel_type) itemno, C_ITEMS, BUT_INVERT) ;
  700. X      }
  701. X  }
  702. X  
  703. X***************
  704. X*** 81,87 ****
  705. X        direction = INCREMENT ;
  706. X        down = nextc ;
  707. X        itemno = n ;
  708. X!       draw_cycle(curwin, (enum panel_type) n, C_LGREY, CY_LINVERT) ;
  709. X      }
  710. X    else if ((curx > ix) && (curx < (ix + CWIDTH)) &&
  711. X             (cury > items[n].y) && (cury < (items[n].y + CHEIGHT)) &&
  712. X--- 84,90 ----
  713. X        direction = INCREMENT ;
  714. X        down = nextc ;
  715. X        itemno = n ;
  716. X!       draw_cycle(curwin, (enum panel_type) n, C_ITEMS, CY_LINVERT) ;
  717. X      }
  718. X    else if ((curx > ix) && (curx < (ix + CWIDTH)) &&
  719. X             (cury > items[n].y) && (cury < (items[n].y + CHEIGHT)) &&
  720. X***************
  721. X*** 90,96 ****
  722. X        direction = DECREMENT ;
  723. X        down = nextc ;
  724. X        itemno = n ;
  725. X!       draw_cycle(curwin, (enum panel_type) n, C_LGREY, CY_RINVERT) ;
  726. X      }
  727. X  }
  728. X  
  729. X--- 93,99 ----
  730. X        direction = DECREMENT ;
  731. X        down = nextc ;
  732. X        itemno = n ;
  733. X!       draw_cycle(curwin, (enum panel_type) n, C_ITEMS, CY_RINVERT) ;
  734. X      }
  735. X  }
  736. X  
  737. X***************
  738. X*** 118,126 ****
  739. X  void
  740. X  check_item_up()
  741. X  {
  742. X-   int color, d ;
  743. X- 
  744. X-   d = (int) cur_dpyno ;
  745. X    if ((nextc == LEFT_UP   && down == LEFT_DOWN)   ||
  746. X        (nextc == MIDDLE_UP && down == MIDDLE_DOWN) ||
  747. X        (nextc == RIGHT_UP  && down == RIGHT_DOWN))
  748. X--- 121,126 ----
  749. X***************
  750. X*** 133,151 ****
  751. X            case P_BUTTON : if (items[itemno].x != -1)
  752. X                              draw_button(items[itemno].wtype,
  753. X                                          (enum panel_type) itemno,
  754. X!                                         C_LGREY, BUT_NORMAL) ;
  755. X                            break ;
  756. X!           case P_CHOICE : color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
  757. X!                           draw_choice(items[itemno].wtype,
  758. X!                                       (enum panel_type) itemno, color) ;
  759. X                            break ;
  760. X            case P_CYCLE  : draw_cycle(items[itemno].wtype,
  761. X                                       (enum panel_type) itemno,
  762. X!                                      C_LGREY, CY_NORMAL) ;
  763. X                            break ;
  764. X!           case P_TOGGLE : color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
  765. X!                           draw_toggle(items[itemno].wtype,
  766. X!                                       (enum panel_type) itemno, color) ;
  767. X          }
  768. X      } 
  769. X  }
  770. X--- 133,151 ----
  771. X            case P_BUTTON : if (items[itemno].x != -1)
  772. X                              draw_button(items[itemno].wtype,
  773. X                                          (enum panel_type) itemno,
  774. X!                                         W_COLOR(C_ITEMS), BUT_NORMAL) ;
  775. X                            break ;
  776. X!           case P_CHOICE : draw_choice(items[itemno].wtype,
  777. X!                                       (enum panel_type) itemno,
  778. X!                                       W_COLOR(C_PANEL)) ;
  779. X                            break ;
  780. X            case P_CYCLE  : draw_cycle(items[itemno].wtype,
  781. X                                       (enum panel_type) itemno,
  782. X!                                      W_COLOR(C_ITEMS), CY_NORMAL) ;
  783. X                            break ;
  784. X!           case P_TOGGLE : draw_toggle(items[itemno].wtype,
  785. X!                                       (enum panel_type) itemno,
  786. X!                                       W_COLOR(C_PANEL)) ;
  787. X          }
  788. X      } 
  789. X  }
  790. X***************
  791. X*** 218,236 ****
  792. X  
  793. X  
  794. X  void
  795. X! do_cycle_key(item, ch)
  796. X! enum panel_type item ;
  797. X! int ch ;
  798. X  {
  799. X!   int color, d, maxw, val ;
  800. X  
  801. X!   d = (int) cur_dpyno ;
  802. X!   color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
  803. X    if (!validkey)
  804. X      {
  805. X        validkey = cur_ch ;
  806. X!       if (item == OPT_EVAL) message(PANEL_MES, "Notes?") ;
  807. X!       else message(PANEL_MES, items[(int) item].label) ;
  808. X      }
  809. X    else
  810. X      {
  811. X--- 218,240 ----
  812. X  
  813. X  
  814. X  void
  815. X! do_key(item, ch)
  816. X! int item, ch ;
  817. X  {
  818. X!   int color, maxw, val ;
  819. X  
  820. X!   color = W_COLOR(C_PANEL) ;
  821. X    if (!validkey)
  822. X      {
  823. X        validkey = cur_ch ;
  824. X!       switch (item)
  825. X!         {
  826. X!           case 'C' : message(PANEL_MES, items[(int) COMP_CHOICE].label) ;
  827. X!                      break ;
  828. X!           case 'D' : message(PANEL_MES, items[(int) DIFF_CHOICE].label) ;
  829. X!                      break ;
  830. X!           case 'O' : message(PANEL_MES, "Option?") ;
  831. X!         }
  832. X      }
  833. X    else
  834. X      {
  835. X***************
  836. X*** 237,290 ****
  837. X        val = -1 ;
  838. X        switch (item)
  839. X          {
  840. X!           case COMP_CHOICE : switch (ch)
  841. X!                                {
  842. X!                                  case 'a' :                  /* All (both). */
  843. X!                                  case 'A' : val = CP_BOTH ;
  844. X!                                             break ;
  845. X!                                  case 'b' :                  /* Black. */
  846. X!                                  case 'B' : val = CP_BLACK ;
  847. X!                                             break ;
  848. X!                                  case 'n' :                  /* Neither. */
  849. X!                                  case 'N' : val = CP_NEITHER ;
  850. X!                                             break ;
  851. X!                                  case 'w' :                  /* White. */
  852. X!                                  case 'W' : val = CP_WHITE ;
  853. X!                                             break ;
  854. X!                                  default  : return ;
  855. X!                                }
  856. X!                              maxw = items[(int) item].width /
  857. X!                                     items[(int) item].nopts ;
  858. X!                              curx = items[(int) item].x + (maxw * val) ;
  859. X!                              itemno = (int) item ;
  860. X!                              items[(int) item].value = val ;
  861. X!                              draw_choice(W_PROPS, item, color) ;
  862. X!                              break ;
  863. X!           case DIFF_CHOICE : if (ch >= '1' && ch <= '9') val = ch - '1' ;
  864. X!                              items[(int) item].value = val ;
  865. X!                              draw_choice(W_PROPS, item, color) ;
  866. X!                              break ;
  867. X!           case OPT_EVAL    : color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
  868. X!                              switch (ch)
  869. X!                                {
  870. X!                                  case 'n' :
  871. X!                                  case 'N' : val = 0 ;
  872. X!                                             break ;
  873. X!                                  case 'y' :
  874. X!                                  case 'Y' : val = 1 ;
  875. X!                                             break ;
  876. X!                                  default  : return ;
  877. X!                                }
  878. X!                              items[(int) item].value = val ;
  879. X!                              draw_toggle(W_PROPS, OPT_EVAL, color) ;
  880. X          }
  881. X        if (val != -1)
  882. X          {
  883. X            validkey = 0 ;
  884. X            message(PANEL_MES, "") ;
  885. X!           items[(int) item].value = item_value = val ;
  886. X            direction = NONE ;
  887. X!           (*items[(int) item].func)() ;
  888. X          }
  889. X      }
  890. X  }
  891. X--- 241,315 ----
  892. X        val = -1 ;
  893. X        switch (item)
  894. X          {
  895. X!           case 'C' : itemno = (int) COMP_CHOICE ;
  896. X!                      switch (ch)
  897. X!                        {
  898. X!                          case 'a' :                  /* All (both). */
  899. X!                          case 'A' : val = CP_BOTH ;
  900. X!                                     break ;
  901. X!                          case 'b' :                  /* Black. */
  902. X!                          case 'B' : val = CP_BLACK ;
  903. X!                                     break ;
  904. X!                          case 'n' :                  /* Neither. */
  905. X!                          case 'N' : val = CP_NEITHER ;
  906. X!                                     break ;
  907. X!                          case 'w' :                  /* White. */
  908. X!                          case 'W' : val = CP_WHITE ;
  909. X!                                     break ;
  910. X!                          default  : return ;
  911. X!                        }
  912. X!                      maxw = items[itemno].width / items[itemno].nopts ;
  913. X!                      curx = items[itemno].x + (maxw * val) ;
  914. X!                      items[itemno].value = val ;
  915. X!                      break ;
  916. X! 
  917. X!           case 'D' : itemno = (int) DIFF_CHOICE ;
  918. X!                      if (ch >= '1' && ch <= '9') val = ch - '1' ;
  919. X!                      maxw = items[itemno].width / items[itemno].nopts ;
  920. X!                      curx = items[itemno].x + (maxw * val) ;
  921. X!                      items[itemno].value = val ;
  922. X!                      break ;
  923. X! 
  924. X!           case 'O' : switch (ch)
  925. X!                        {
  926. X!                          case 'a' :
  927. X!                          case 'A' : itemno = (int) OPT_ANIM ;
  928. X!                                     break ;
  929. X!                          case 'b' :
  930. X!                          case 'B' : itemno = (int) OPT_BEST ;
  931. X!                                     break ;
  932. X!                          case 'l' :
  933. X!                          case 'L' : itemno = (int) OPT_LAST ;
  934. X!                                     break ;
  935. X!                          case 'e' :
  936. X!                          case 'E' : itemno = (int) OPT_EVAL ;
  937. X!                                     break ;
  938. X!                          case 'n' :
  939. X!                          case 'N' : itemno = (int) OPT_NUM ;
  940. X!                                     break ;
  941. X!                          case 'f' :
  942. X!                          case 'F' : itemno = (int) OPT_FLIP ;
  943. X!                                     break ;
  944. X!                          default  : return ;
  945. X!                        }
  946. X!                      val = items[itemno].value ;
  947. X          }
  948. X        if (val != -1)
  949. X          {
  950. X            validkey = 0 ;
  951. X            message(PANEL_MES, "") ;
  952. X!           items[itemno].value = item_value = val ;
  953. X            direction = NONE ;
  954. X!           (*items[itemno].func)() ;
  955. X! 
  956. X!           switch (item)
  957. X!             {
  958. X!               case 'C' : draw_choice(W_PROPS, (enum panel_type) itemno, color) ;
  959. X!                          break ;
  960. X!               case 'D' : draw_choice(W_PROPS, (enum panel_type) itemno, color) ;
  961. X!                          break ;
  962. X!               case 'O' : draw_toggle(W_PROPS, (enum panel_type) itemno, color) ;
  963. X!             }
  964. X          }
  965. X      }
  966. X  }
  967. X***************
  968. X*** 342,352 ****
  969. X    process_event() ;
  970. X  
  971. X         if (nextc == FRAME_REPAINT) init_canvas() ;
  972. X    else if (nextc == PROPS_REPAINT) paint_prop_sheet() ;
  973. X    else if (nextc == KEYBOARD)      handle_key() ;
  974. X    else if (nextc == EXIT_WINDOW && but_inverted != -1)
  975. X      {
  976. X!       draw_button(W_MAIN, (enum panel_type) but_inverted, C_LGREY, BUT_NORMAL) ;
  977. X        but_inverted = -1 ;
  978. X        down = 0 ;
  979. X      }
  980. X--- 367,378 ----
  981. X    process_event() ;
  982. X  
  983. X         if (nextc == FRAME_REPAINT) init_canvas() ;
  984. X+   else if (nextc == HELP_REPAINT)  paint_help() ;
  985. X    else if (nextc == PROPS_REPAINT) paint_prop_sheet() ;
  986. X    else if (nextc == KEYBOARD)      handle_key() ;
  987. X    else if (nextc == EXIT_WINDOW && but_inverted != -1)
  988. X      {
  989. X!       draw_button(W_MAIN, (enum panel_type) but_inverted, C_ITEMS, BUT_NORMAL) ;
  990. X        but_inverted = -1 ;
  991. X        down = 0 ;
  992. X      }
  993. X***************
  994. X*** 388,400 ****
  995. X      }
  996. X    switch (cur_ch)
  997. X      {
  998. X!       case 'C' : do_cycle_key(COMP_CHOICE, nextc) ;    /* Cycle items. */
  999. X                   break ;
  1000. X-       case 'D' : do_cycle_key(DIFF_CHOICE, nextc) ;
  1001. X-                  break ;
  1002. X-       case 'N' : do_cycle_key(OPT_EVAL,    nextc) ;
  1003. X-                  break ;
  1004. X  
  1005. X        case 'M' : show_all_moves() ;                    /* Button items. */
  1006. X                   break ;
  1007. X        case 'L' : curx = 0 ;
  1008. X--- 414,426 ----
  1009. X      }
  1010. X    switch (cur_ch)
  1011. X      {
  1012. X!       case 'C' :                                       /* Computer choice. */
  1013. X!       case 'D' :                                       /* Difficulty. */
  1014. X!       case 'O' : do_key(cur_ch, nextc) ;               /* Options. */
  1015. X                   break ;
  1016. X  
  1017. X+       case 'H' : do_help() ;
  1018. X+                  break ;
  1019. X        case 'M' : show_all_moves() ;                    /* Button items. */
  1020. X                   break ;
  1021. X        case 'L' : curx = 0 ;
  1022. X***************
  1023. X*** 402,407 ****
  1024. X--- 428,435 ----
  1025. X                   break ;
  1026. X        case 'n' : new_game() ;
  1027. X                   break ;
  1028. X+       case 'r' : redo() ;
  1029. X+                  break ;
  1030. X        case 'S' : curx = BBORDER + (2*(BWIDTH+BGAP)) ;
  1031. X                   draw_textfield() ;
  1032. X                   break ;
  1033. X***************
  1034. X*** 411,416 ****
  1035. X--- 439,448 ----
  1036. X                   break ;
  1037. X        case 'p' : do_props() ;
  1038. X                   break ;
  1039. X+ 
  1040. X+       case CTL('l') : init_canvas() ;
  1041. X+                       paint_prop_sheet() ;
  1042. X+                       break ;
  1043. X  
  1044. X        case 'q' : destroy_frame() ;
  1045. X                   exit(0) ;
  1046. X
  1047. END_OF_FILE
  1048. if test 37317 -ne `wc -c <'patches04c'`; then
  1049.     echo shar: \"'patches04c'\" unpacked with wrong size!
  1050. fi
  1051. # end of 'patches04c'
  1052. fi
  1053. echo shar: End of archive 3 \(of 4\).
  1054. cp /dev/null ark3isdone
  1055. MISSING=""
  1056. for I in 1 2 3 4 ; do
  1057.     if test ! -f ark${I}isdone ; then
  1058.     MISSING="${MISSING} ${I}"
  1059.     fi
  1060. done
  1061. if test "${MISSING}" = "" ; then
  1062.     echo You have unpacked all 4 archives.
  1063.     rm -f ark[1-9]isdone
  1064. else
  1065.     echo You still need to unpack the following archives:
  1066.     echo "        " ${MISSING}
  1067. fi
  1068. ##  End of shell archive.
  1069. exit 0
  1070.